package Chain;

/**
 * @Author:CJJ
 * 使用Broker类来管理 BuyStock和SellStock类
 */
public class CommandPatternDemo {
    public static void main(String[] args){
        Stock abcStock = new Stock();

        BuyStock buyStock = new BuyStock(abcStock);
        SellStock sellStock = new SellStock(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrders();

    }
}
